//q2.cpp
//This program takes a circle radius and outputs the area and perimeter.
//
//Binyamin 7 december 2017
//===========================================================================

#include <iostream>

using namespace std;

const double PI = 3.1415;

//1. Prompt the user for a radius
//2. Capture the radius
//3. calculate the area
//4. calculate the perimeter
//5. print the area and perimeter

int main()
{
	int r; // r - used to store the radius of the circle.
	double area, perimeter; // aera - used to store the area of the circle
			    	// perimeter - used to store the perimeter of the circle
	cout << "Please enter a radius: ";
	cin >> r;
	area = r*r*PI;
	perimeter = r*2*PI;
	cout << "The area of the circle is: " << area << endl \
		<< "The perimeter of the circle is: " << perimeter << endl;
	return 0;
}
//output:
//Please enter a radius: 4
//The area of the circle is: 50.264
//The perimeter of the circle is: 25.132
